package com.iwop.moto.service.impl;

import com.iwop.moto.dao.PayPassCodeDao;
import com.iwop.moto.model.SPayPassCode;
import com.iwop.moto.service.SPayPassCodeService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by user on 2017/1/3.
 */
@Service
public class PayPassCodeServiceImpl implements SPayPassCodeService {


    @Autowired
    private PayPassCodeDao payPassCodeDao;

    @Override
    public void insert(SPayPassCode sPayPassCode) {
        payPassCodeDao.insert(sPayPassCode);
    }

    @Override
    public void update(SPayPassCode sPayPassCode) {
        payPassCodeDao.update(sPayPassCode);
    }

    @Override
    public SPayPassCode getById(@Param("userId") String userId) {
        return null;
    }
    @Override
    public SPayPassCode getByUserId(@Param("userId") String userId) {
        return payPassCodeDao.getByUserId(userId);
    }

    @Override
    public SPayPassCode getPayPassCode(String userId) {
        return payPassCodeDao.getPayPassCode(userId);
    }

    @Override
    public void updateByUserId(SPayPassCode sPayPassCode) {
        payPassCodeDao.updateByUserId(sPayPassCode);
    }

    @Override
    public void deleteById(String userId) {
        payPassCodeDao.deleteById(userId);
    }


}
